/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package metro.jme.lottery.graphics.screens;

import java.io.IOException;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.StringItem;
import metro.jme.lottery.util.ImageHelper;

/**
 * Class displaying the help screen of the application
 * @author pierrej
 */
public class HelpScreen extends Form {

	public static final String DISCLAIMER = "You need an internet connection to use all features of this amazing application";
	public static final String WHAT = "Metropolia Lottery checker allows use to check the result of the lottery whereever you are !";
	public static final String WHY = "Well if you want to have regrets and know how much you could have won if you had played, use this app !";
	public static final String CONTACT = "Pierre JAMBET email adress : pierre[dot]jambet{at}gmail(dot)com";
	public static final String HOW = "To use this app, you need an internet connection. Then you can create number sets in the \"Edit\" menu, to validate a set, it needs to be composed of numbers between 0 and 99, and separated by blank space, then you can check with the \"Check\" menu";
	
	
	public HelpScreen() {
		super("Help");
		
		StringItem si = new StringItem("Disclaimer:", DISCLAIMER, StringItem.PLAIN);
		Font font = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE);
		si.setFont(font);
		this.append(si);
		
		font = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
		si = new StringItem("What does this application do ?", WHY, StringItem.PLAIN);
		si.setFont(font);
		this.append(si);
		si = new StringItem("Why should you use this app ?", WHY, StringItem.PLAIN);
		si.setFont(font);
		this.append(si);
		si = new StringItem("How will you use this app ?", HOW, StringItem.PLAIN);
		si.setFont(font);
		this.append(si);
		si = new StringItem("Having a problem ?", CONTACT, StringItem.PLAIN);
		si.setFont(font);
		this.append(si);
		
		try {
			Image duke = Image.createImage(
					ImageHelper.getOptimalImage("/imgs/duke.png", getWidth()));
			this.append(duke);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
